.documentPage {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--mb-color-bg-white);
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 0;
  background-color: var(--mb-color-bg-white);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.contentArea {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.mainContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 3rem 0 2rem;
  scroll-padding-top: 32px;
}

.documentContainer {
  width: 100%;
  padding: 0 2rem 4rem;
}

@media print {
  body:has(.documentContainer) {
    visibility: hidden;

    /* side nav */
    aside {
      display: none;
    }
  }

  .documentContainer {
    position: absolute;
    visibility: visible;
    top: 0;
    right: 0;
    z-index: 1000;

    .header {
      padding: 0;
    }

    :global(.node-metabot),
    :global(.node-cardEmbed) {
      break-inside: avoid;
    }

    [data-hide-on-print] {
      visibility: hidden;
    }
  }
}

@media not print {
  .documentContainer {
    [data-show-on-print] {
      display: none;
    }
  }
}

.sidebar {
  width: 360px;
  flex-shrink: 0;
  background-color: var(--mb-color-bg-light);
  border-left: 1px solid var(--mb-color-border);
  overflow-y: auto;
}

.cardEmbed {
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cardEmbed:hover {
  background-color: var(--mb-color-bg-medium);
}

.highlighted {
  animation: highlight 2s ease-out;
}

@keyframes highlight {
  0% {
    background-color: var(--mb-color-brand-light);
    box-shadow: 0 0 0 4px var(--mb-color-brand-light);
  }

  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.metadataItem {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--mb-color-text-secondary);
}
